<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // break语句一般用于结束离它最近的循环或switch
        // 也可以通过标签结束指定的循环
        out:
        for(var i = 0; i < 9; i++){
            document.write("i = "+i);
            for (var j = 0; j < 5; j++){
                document.write(" j = "+j);
                // break;
                break out;
            }
            document.write("</br>");
        }
    </script>
</head>
<body>
    
</body>
</html>